package cn.faifai.tagapi.entity;

import jakarta.persistence.Column;
import jakarta.persistence.MappedSuperclass;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;

import java.util.Date;

@Data
@MappedSuperclass
public class BaseEntity {
    /**
     * 创建日期
     */
    @CreatedDate
    @Column(name = "created_at")
    private Date createdAt;

    /**
     * 最近修改日期
     */
    @LastModifiedDate
    @Column(name = "last_modified_at")
    private Date lastModifiedAt;
}
